import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document, Types } from 'mongoose';
export type MaterialDocument = Material & Document;
@Schema({ timestamps: true })
export class Material extends Document {
  @Prop({ }) // 材料文本内容
  content: string;

  @Prop([String]) // 材料关联的图片URL
  imageUrls: string[];

  @Prop()
  category: string;
}

export const MaterialSchema = SchemaFactory.createForClass(Material);